<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>考勤记录</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="commons/css/common.css" />
		<link rel="stylesheet" type="text/css" href="commons/css/button.css" />		
		<style>
			#pageinfo {
				position: absolute;
				bottom:100px;
				right:45px;
			}		
		</style>
	</head>
	<body>
		<div align="center">
			<table class='details'>
				<tr>
					<td>
						考勤信息如下：
						<c:if test="${empty page.dataList}"><span style="color:red;">查找无信息</span></c:if>
					</td>
				</tr>
			</table>
			<form action="chk_show.action?id=${employee.id}" method="post">
			<input type="hidden" name="pageNo" id="pageNo" />
			</form>
			<c:if test="${not empty page.dataList}">
				<table class='details'>
					<tr style="text-align:center;">
						<td class='tr' width="40px">
							编号
						</td>
						<td class='tr'>
							员工
						</td>
						<td class='tr'>
							月份
						</td>
						<td class='tr'>
							本月天数
						</td>
						<td class='tr'>
							工作天数
						</td>
						<td class='tr'>
							假期天数
						</td>
						<td class='tr'>
							请假天数
						</td>
						<td class='tr'>
							假期加班天数
						</td>
						<td class='tr'>
							一般加班数
						</td>
					</tr>
					<c:forEach var="item" items="${page.dataList}" varStatus="s">
						<tr style="text-align:center;">
							<td>${s.index+1*page.pageNo}</td>
							<td>${item.employee.name}</td>
							<td><fmt:formatDate pattern="yyyy年MM月" value="${item.month}"/></td>
							<td>${item.monthDays}天</td>
							<td>${item.workDays}天</td>
							<td>${item.vacationDays}天</td>
							<td>${item.leaveDays}天</td>
							<td>${item.VOvertime}天</td>
							<td>${item.NOvertime}天</td>
						</tr>
					</c:forEach>
				</table>
				<div id="pageinfo">
					<jsp:include page="/page.jsp"></jsp:include>
				</div>
			</c:if>
		</div>
	</body>
</html>
